using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class stickplatform : MonoBehaviour
{
    // Start is called before the first frame update
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if(collision.gameObject.name=="player")
        {
            collision.gameObject.transform.SetParent(transform);


        }
    }

    // Update is called once per frame
    private void OnTriggerExit2D(Collider2D collision)
   
    {
        if(collision.gameObject.name=="player")
        {
            collision.gameObject.transform.SetParent(null);

        }



    }
    
        
    
}
